package com.ag.zhh.service;

import java.util.List;

import com.ag.zhh.dao.DeptDAO;
import com.ag.zhh.dao.UserDeptDAO;
import com.ag.zhh.vo.Dept;
import com.ag.zhh.vo.UserDept;

public class LocalDeptService {
	private UserDeptDAO userdeptDAO;
	
	public void setDeptDIfOnly(List<String> DIds) throws Exception {
		userdeptDAO.setDeptDIfOnly(DIds);
	}

	public void resetDeptDIfOnly(List<String> DIds) throws Exception {
		userdeptDAO.resetDeptDIfOnly(DIds);
	}
	
	
	
	public void saveOrUpdateDept(UserDept dept) {
		userdeptDAO.saveOrUpdateDept(dept);

	}
	
	public void deleteDept(UserDept dept) {
		userdeptDAO.deleteDept(dept);
		//reloadTree;
	}
	public void deleteDept(String deptId) {
		userdeptDAO.deleteDept(deptId);
		//reloadTree;
	}
	
	public void setDeptforInformIncident(List<String> DIds) {
		
	}
	//查询事件通知部门
	public List<UserDept> findDept() throws Exception
	{
		return userdeptDAO.findByDIf(1);
	}
	public UserDeptDAO getDeptDAO() {
		return userdeptDAO;
	}

	public void setDeptDAO(UserDeptDAO deptDAO) {
		this.userdeptDAO = deptDAO;
	}
	
}
